package com.qf.pojo;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.qf.config.MySerializer;

import java.util.Arrays;
import java.util.Date;
import java.util.List;

/**
 * @author bss
 * @version V1.0
 * @Project maven
 * @Package com.qf.pojo
 * @Description:
 * @Date 2022/9/30 17:41
 */
public class User {
    private Integer id;
    @JSONField(name = "username")
    private String name;
    @JSONField(serialize = false)
    private Boolean flag;
    @JSONField(serialzeFeatures = SerializerFeature.WriteNullStringAsEmpty)
    private Double money;
    @JSONField(serializeUsing = MySerializer.class)
    private Character sex;
    @JSONField(format = "yyyy-mm-dd")
    private Date date;
    private List<String> list;
    private String[] arr;

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", flag=" + flag +
                ", money=" + money +
                ", sex=" + sex +
                ", date=" + date +
                ", list=" + list +
                ", arr=" + Arrays.toString(arr) +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Boolean getFlag() {
        return flag;
    }

    public void setFlag(Boolean flag) {
        this.flag = flag;
    }

    public Double getMoney() {
        return money;
    }

    public void setMoney(Double money) {
        this.money = money;
    }

    public Character getSex() {
        return sex;
    }

    public void setSex(Character sex) {
        this.sex = sex;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public List<String> getList() {
        return list;
    }

    public void setList(List<String> list) {
        this.list = list;
    }

    public String[] getArr() {
        return arr;
    }

    public void setArr(String[] arr) {
        this.arr = arr;
    }
}
